3.1.7 \(\int \frac {\log (c (a+b x^2)^p)}{x^2} \, dx\) [7]

Optimal. Leaf size=44 \[ \frac {2 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x} \]

[Out]

-ln(c*(b*x^2+a)^p)/x+2*p*arctan(x*b^(1/2)/a^(1/2))*b^(1/2)/a^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2505, 211} \begin {gather*} \frac {2 \sqrt {b} p \text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[c*(a + b*x^2)^p]/x^2,x]

[Out]

(2*Sqrt[b]*p*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[a] - Log[c*(a + b*x^2)^p]/x

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 2505

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))*((f_.)*(x_))^(m_.), x_Symbol] :> Simp[(f*x)^(m +
 1)*((a + b*Log[c*(d + e*x^n)^p])/(f*(m + 1))), x] - Dist[b*e*n*(p/(f*(m + 1))), Int[x^(n - 1)*((f*x)^(m + 1)/
(d + e*x^n)), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && NeQ[m, -1]

Rubi steps

\begin {align*} \int \frac {\log \left (c \left (a+b x^2\right )^p\right )}{x^2} \, dx &=-\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x}+(2 b p) \int \frac {1}{a+b x^2} \, dx\\ &=\frac {2 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 44, normalized size = 1.00 \begin {gather*} \frac {2 \sqrt {b} p \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\log \left (c \left (a+b x^2\right )^p\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(a + b*x^2)^p]/x^2,x]

[Out]

(2*Sqrt[b]*p*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[a] - Log[c*(a + b*x^2)^p]/x

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.22, size = 195, normalized size = 4.43

method result size
risch \(-\frac {\ln \left (\left (b \,x^{2}+a \right )^{p}\right )}{x}-\frac {i \pi a \,\mathrm {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{2}-i \pi a \,\mathrm {csgn}\left (i \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right ) \mathrm {csgn}\left (i c \right )-i \pi a \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{3}+i \pi a \mathrm {csgn}\left (i c \left (b \,x^{2}+a \right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right )-2 \sqrt {-b a}\, p \ln \left (-b x -\sqrt {-b a}\right ) x +2 \sqrt {-b a}\, p \ln \left (-b x +\sqrt {-b a}\right ) x +2 \ln \left (c \right ) a}{2 a x}\) \(195\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(b*x^2+a)^p)/x^2,x,method=_RETURNVERBOSE)

[Out]

-1/x*ln((b*x^2+a)^p)-1/2*(I*Pi*a*csgn(I*(b*x^2+a)^p)*csgn(I*c*(b*x^2+a)^p)^2-I*Pi*a*csgn(I*(b*x^2+a)^p)*csgn(I
*c*(b*x^2+a)^p)*csgn(I*c)-I*Pi*a*csgn(I*c*(b*x^2+a)^p)^3+I*Pi*a*csgn(I*c*(b*x^2+a)^p)^2*csgn(I*c)-2*(-b*a)^(1/
2)*p*ln(-b*x-(-b*a)^(1/2))*x+2*(-b*a)^(1/2)*p*ln(-b*x+(-b*a)^(1/2))*x+2*ln(c)*a)/a/x

________________________________________________________________________________________

Maxima [A]
time = 0.51, size = 36, normalized size = 0.82 \begin {gather*} \frac {2 \, b p \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}} - \frac {\log \left ({\left (b x^{2} + a\right )}^{p} c\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(b*x^2+a)^p)/x^2,x, algorithm="maxima")

[Out]

2*b*p*arctan(b*x/sqrt(a*b))/sqrt(a*b) - log((b*x^2 + a)^p*c)/x

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 105, normalized size = 2.39 \begin {gather*} \left [\frac {p x \sqrt {-\frac {b}{a}} \log \left (\frac {b x^{2} + 2 \, a x \sqrt {-\frac {b}{a}} - a}{b x^{2} + a}\right ) - p \log \left (b x^{2} + a\right ) - \log \left (c\right )}{x}, \frac {2 \, p x \sqrt {\frac {b}{a}} \arctan \left (x \sqrt {\frac {b}{a}}\right ) - p \log \left (b x^{2} + a\right ) - \log \left (c\right )}{x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(b*x^2+a)^p)/x^2,x, algorithm="fricas")

[Out]

[(p*x*sqrt(-b/a)*log((b*x^2 + 2*a*x*sqrt(-b/a) - a)/(b*x^2 + a)) - p*log(b*x^2 + a) - log(c))/x, (2*p*x*sqrt(b
/a)*arctan(x*sqrt(b/a)) - p*log(b*x^2 + a) - log(c))/x]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 245 vs. \(2 (39) = 78\).
time = 7.95, size = 245, normalized size = 5.57 \begin {gather*} \begin {cases} - \frac {\log {\left (0^{p} c \right )}}{x} & \text {for}\: a = 0 \wedge b = 0 \\- \frac {\log {\left (a^{p} c \right )}}{x} & \text {for}\: b = 0 \\- \frac {2 p}{x} - \frac {\log {\left (c \left (b x^{2}\right )^{p} \right )}}{x} & \text {for}\: a = 0 \\- \frac {a^{2} \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{a^{2} x + a b x^{3}} - \frac {2 a p x \sqrt {- \frac {a}{b}} \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{\frac {a^{2} x}{b} + a x^{3}} - \frac {a x^{2} \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{\frac {a^{2} x}{b} + a x^{3}} + \frac {a x \sqrt {- \frac {a}{b}} \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{\frac {a^{2} x}{b} + a x^{3}} - \frac {2 b p x^{3} \sqrt {- \frac {a}{b}} \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{\frac {a^{2} x}{b} + a x^{3}} + \frac {b x^{3} \sqrt {- \frac {a}{b}} \log {\left (c \left (a + b x^{2}\right )^{p} \right )}}{\frac {a^{2} x}{b} + a x^{3}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(b*x**2+a)**p)/x**2,x)

[Out]

Piecewise((-log(0**p*c)/x, Eq(a, 0) & Eq(b, 0)), (-log(a**p*c)/x, Eq(b, 0)), (-2*p/x - log(c*(b*x**2)**p)/x, E
q(a, 0)), (-a**2*log(c*(a + b*x**2)**p)/(a**2*x + a*b*x**3) - 2*a*p*x*sqrt(-a/b)*log(x - sqrt(-a/b))/(a**2*x/b
 + a*x**3) - a*x**2*log(c*(a + b*x**2)**p)/(a**2*x/b + a*x**3) + a*x*sqrt(-a/b)*log(c*(a + b*x**2)**p)/(a**2*x
/b + a*x**3) - 2*b*p*x**3*sqrt(-a/b)*log(x - sqrt(-a/b))/(a**2*x/b + a*x**3) + b*x**3*sqrt(-a/b)*log(c*(a + b*
x**2)**p)/(a**2*x/b + a*x**3), True))

________________________________________________________________________________________

Giac [A]
time = 4.07, size = 40, normalized size = 0.91 \begin {gather*} \frac {2 \, b p \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {a b}} - \frac {p \log \left (b x^{2} + a\right )}{x} - \frac {\log \left (c\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(b*x^2+a)^p)/x^2,x, algorithm="giac")

[Out]

2*b*p*arctan(b*x/sqrt(a*b))/sqrt(a*b) - p*log(b*x^2 + a)/x - log(c)/x

________________________________________________________________________________________

Mupad [B]
time = 0.22, size = 36, normalized size = 0.82 \begin {gather*} \frac {2\,\sqrt {b}\,p\,\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {\ln \left (c\,{\left (b\,x^2+a\right )}^p\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(a + b*x^2)^p)/x^2,x)

[Out]

(2*b^(1/2)*p*atan((b^(1/2)*x)/a^(1/2)))/a^(1/2) - log(c*(a + b*x^2)^p)/x

________________________________________________________________________________________